home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
iqb9109.zip
/
CVTMBF.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-09-09
|
620b
|
22 lines
' CvtMBF.BAS
' Functions to convert to and from IEEE and Microsoft Binary format numbers
'
FUNCTION IEEE2MBF (A AS SINGLE)
' Convert IEEE-format single-precision numbers to MBF
DIM mbfSingle AS TrickSingle
DIM SingleCVBuf AS SingleMBFStr
SingleCVBuf.Bytes = MKSMBF$(A)
LSET mbfSingle = SingleCVBuf
IEEE2MBF = mbfSingle.Bytes
END FUNCTION
FUNCTION MBF2IEEE (A AS SINGLE)
' Convert Microsoft Binary format single-precision numbers to IEEE
DIM mbfSingle AS TrickSingle
DIM SingleCVBuf AS SingleMBFStr
mbfSingle.Bytes = A
LSET SingleCVBuf = mbfSingle
MBF2IEEE = CVSMBF(SingleCVBuf.Bytes)
END FUNCTION